package com.tripcube.ai.service;

import com.tripcube.ai.model.dto.CreateKnowledgeBaseDTO;

import java.util.List;

/**
 * 知识库管理服务接口
 * 
 * @author tripcube
 */
public interface KnowledgeBaseService {

    Object createKnowledgeBase(CreateKnowledgeBaseDTO createDTO);

    Object selectKnowledgeBaseList(String indexName,String pageNumber,String pageSize);

    int deleteKnowledgeBase(String knowledgeBaseId);

    int deleteKnowledgeBaseBatch(String[] knowledgeBaseIds);



    Object SubmitIndexJob(String indexId);

    Object getIndexJobStatus(String indexId, String jobId);

    Object submitIndexAddDocumentsJob(String indexId, String sourceType, List<String> categoryIds, List<String> documentIds);
    
    /**
     * 查询索引下的分片列表
     */
    Object listChunks(String indexId, String fileId, Integer pageNum, Integer pageSize, List<String> fields) throws Exception;

    /**
     * 修改切片
     */
    Object updateChunk(String indexId, String dataId, String chunkId, Boolean isDisplayedChunkContent, String content, String title) throws Exception;

    /**
     * 删除切片
     */
    Object deleteChunks(String indexId, List<String> chunkIds) throws Exception;
    
    /**
     * 查询索引下的文档列表
     */
    Object listIndexDocuments(String indexId, String documentStatus, String documentName, Integer pageNumber, Integer pageSize) throws Exception;

    /**
     * 删除知识库索引文档
     */
    Object deleteIndexDocument(String indexId, List<String> documentIds) throws Exception;
}